<template>
  <!-- ※※※ 类名更换成对应页面名称，如列表页(list-main) ※※※ -->
  <div class="disclaimer-main">
    <div class="com-header">
      <button @click="$router.go(-1)"><i></i></button>
      <span>关于我们</span>
    </div>
    <!-- 网页内容区域 -->
    <div class="view-content">
       <div class="wrapper" v-html="content"></div>
    </div>
  </div>
</template>

<script>
  import {Toast} from 'mint-ui'
  import api from '~/plugins/api.js'
  import axios from 'axios'
  export default {
    head: {
      title: '关于我们 - 快眼看书',
      meta: [{
            name: 'description',
            content: '快眼看书专注于玄幻小说搜索,新版快眼看书,提供最全的小说保持最快的更新,方便大家愉快地阅读玄幻小说'
        },{
            name: 'keyWords',
            content: '关于我们,快眼看书'
      }]
    },
    data() {
        return {
            content: ''
        }
    },
    created() {
        if(!process.server){
            this.initData()
        }
    },
    methods: {
        async initData() {
            let res = await axios.get(api.about)
            if(res){
                if(res.data.status){
                    let data = res.data.data
                    this.content = data
                }else{
                    Toast(res.data.info)
                }
                
            }
        }
    },
    async asyncData(context){
         if(process.server){
            let res = await axios.get(api.about)
            if(res){
                let data = res.data.data
                return {content: data}
            }
         }
    }
  }
</script>